package factory.abstractFactory.actual.factory;

import factory.abstractFactory.actual.product.Pen;
import factory.abstractFactory.actual.rubbish.PenRubbish;
import factory.abstractFactory.virtual.factory.BaseFactory;
import factory.abstractFactory.virtual.product.Product;
import factory.abstractFactory.virtual.product.Rubbish;

/**
 * 工厂实现类
 *
 * @author 若雨成霜
 * @Created with IDEA
 */

public class PenFactory implements BaseFactory {
    @Override
    public Product produce() {
        return new Pen();
    }

    /**
     * 销毁
     *
     * @return
     */
    @Override
    public Rubbish destroy() {
        return new PenRubbish();
    }
}
